#include <bits/stdc++.h>
using namespace std;
#define rep(i, l, r) for (int i = l; i <= r; ++i)
typedef double db; 
const int N = 5e5 + 5;
const db inf = 1e6, eps = 1e-6; 
struct node { 
  int u; db f; 
  bool operator < (const node &x) const {
    return f > x.f; 
  }
} ;
vector <int> G[N]; 
int n, T, a[N], q[N], g[N]; db f[N], p[N];   
priority_queue <node> Q; 

int main () {
  freopen ("I.in", "r", stdin); 
  freopen ("I.out", "w", stdout); 
  cout << (T = 1) << '\n'; 
  mt19937 rng(time(NULL)); 
  while (T--) {
    n = 50000; 
    printf("%d\n", n); 
    rep(i, 1, n) printf("%d ", rng() % i); printf("\n"); 
    rep(i, 1, n) printf("%d ", rng() % 100000); printf("\n"); 
  }
  return 0; 
}